require(['./config'], function() {
	require(['jquery', 'swiper', 'template', 'loadHF'], function($, Swiper, template) {
		var galleryThumbs = new Swiper('.gallery-thumbs', {
			direction: 'vertical',
			spaceBetween: 40,
			slidesPerView: 5,
			freeMode: true,
			watchSlidesVisibility: true,
			watchSlidesProgress: true,
		});
		var galleryTop = new Swiper('.gallery-top', {
			spaceBetween: 1,
			navigation: {
				nextEl: '.swiper-button-next',
				prevEl: '.swiper-button-prev',
			},
			thumbs: {
				swiper: galleryThumbs
			}
		});

		$('.events-dropdown').click(function() {
				$('.sub-menu').toggle('fast',function() {
					$('.dropdown .icon-caret').toggleClass('bg_position')
				});
			})
	
//				class Detail {
//					constructor() {
//						this.init()
//					}
//					init() {
//						const _id = window.location.search.slice(4)
//						
//						const url = `http://www.xiongmaoyouxuan.com/api/detail?id=${_id}`
//						$.getJSON(url, resp => {
//							console.log(resp.data);
//							const _prod = resp.data.detail
//							
//							const data = {
//								prod: _prod
//							}
//							const html = template('detail-template', data)
//							$('.detail_box'.pretend(html))
//						})
//					}
//		
//				}
//		
//				new Detail()

	})
})